package website.digitalocean.chapter20;

/**
 * @author: longhc@citycloud.com.cn
 * @since: 2023/2/16 14:33
 * @version: 1.0
 */
public class TerminalExpression implements Expression {

    private String data;

    public TerminalExpression(String data) {
        this.data = data;
    }

    @Override
    public boolean interpret(String context) {
        return context.contains(data);
    }
}
